(global.webpackJsonp = global.webpackJsonp || []).push([ [ "components/virtual-box/index" ], {
    "0782": function(e, t, n) {
        (function(e) {
            Object.defineProperty(t, "__esModule", {
                value: !0
            }), t.default = void 0;
            var n = {
                components: {},
                props: {
                    contactDriver: {
                        type: Object,
                        default: function() {
                            return {};
                        }
                    },
                    canEdit: {
                        type: Boolean,
                        default: !0
                    },
                    realDriverNumber: {}
                },
                data: function() {
                    return {
                        isShowInput: !1,
                        isShowResult: !1,
                        formatPhone: null,
                        enterPhone: null,
                        resultPhone: !1,
                        isShowTips: !1,
                        callPhone: null,
                        isCallRealPhone: !1,
                        driverRoleText: "司机"
                    };
                },
                mounted: function() {
                    var e = this.contactDriver;
                    this.callPhone = e.callPhone || "", this.formatPhone = this.getResultPhone(e.bindPhone), 
                    this.driverRoleText = this.$store.getters.driverRoleText;
                },
                methods: {
                    callRealPhone: function() {
                        this.isCallRealPhone = !0;
                    },
                    cancel: function() {
                        if (this.isShowInput) return this.isShowInput = !1, void (this.isShowTips = !1);
                        this.isCallRealPhone = !1, this.$emit("cancel");
                    },
                    changeNum: function() {
                        this.isShowInput = !0;
                    },
                    checkPhone: function(e) {
                        return /^1\d{10}$/g.test(e);
                    },
                    call: function() {
                        if (this.isCallRealPhone && this.realDriverNumber) return this.cancel(), e.makePhoneCall({
                            phoneNumber: this.realDriverNumber
                        });
                        var t = this.enterPhone;
                        this.checkPhone(t) || !this.isShowInput ? (this.isShowInput ? (this.$emit("getVirtualPhone", {
                            detail: this.enterPhone
                        }), this.cancel()) : e.makePhoneCall({
                            phoneNumber: this.callPhone
                        }), this.$emit("cancel")) : this.isShowTips = !0;
                    },
                    checkState: function(e) {
                        if (this.checkPhone(e)) {
                            var t = this.getResultPhone(e);
                            this.isShowTips = !1, this.enterPhone = e, this.resultPhone = t, this.isShowResult = !0;
                        }
                    },
                    inputFocus: function() {
                        this.isShowTips = !1;
                    },
                    blurInput: function(e) {
                        var t = e.detail.value;
                        this.checkState(t);
                    },
                    showInput: function() {
                        this.isShowResult = !1;
                    },
                    changeInput: function(e) {
                        var t = e.detail.value;
                        this.enterPhone = t;
                    },
                    getResultPhone: function(e) {
                        var t = ("string" != typeof e ? String(e) : e).split("");
                        return t.splice(3, 0, " "), t.splice(8, 0, " "), t.join("") || " ";
                    }
                }
            };
            t.default = n;
        }).call(this, n("543d").default);
    },
    2861: function(e, t, n) {
        n.d(t, "b", function() {
            return i;
        }), n.d(t, "c", function() {
            return o;
        }), n.d(t, "a", function() {});
        var i = function() {
            this.$createElement;
            this._self._c;
        }, o = [];
    },
    3651: function(e, t, n) {
        n.r(t);
        var i = n("2861"), o = n("8d0a");
        for (var s in o) [ "default" ].indexOf(s) < 0 && function(e) {
            n.d(t, e, function() {
                return o[e];
            });
        }(s);
        n("8574");
        var l = n("f0c5"), a = Object(l.a)(o.default, i.b, i.c, !1, null, "f4fa5234", null, !1, i.a, void 0);
        t.default = a.exports;
    },
    8574: function(e, t, n) {
        var i = n("cfe6");
        n.n(i).a;
    },
    "8d0a": function(e, t, n) {
        n.r(t);
        var i = n("0782"), o = n.n(i);
        for (var s in i) [ "default" ].indexOf(s) < 0 && function(e) {
            n.d(t, e, function() {
                return i[e];
            });
        }(s);
        t.default = o.a;
    },
    cfe6: function(e, t, n) {}
} ]), (global.webpackJsonp = global.webpackJsonp || []).push([ "components/virtual-box/index-create-component", {
    "components/virtual-box/index-create-component": function(e, t, n) {
        n("543d").createComponent(n("3651"));
    }
}, [ [ "components/virtual-box/index-create-component" ] ] ]);